<?php

namespace app\admin\model\wanlshop;

use think\Model;
use app\admin\model\User;

class UserShare extends Model
{
    // 表名
    protected $name = 'wanlshop_user_share';

    // 自动写入时间戳字段
    protected $autoWriteTimestamp = false;

    public function user()
    {
        return $this->belongsTo(User::class, 'user_id', 'id');
    }

    public function parent()
    {
        return $this->belongsTo(User::class, 'parent_id', 'id');
    }
}
